import Mathlib.Data.Vector import Mathlib.Data.Bitvec.Basic import Mathlib.Algebra.Group.InjSurj import Mathlib.Tactic.Ring import Mathlib.Data.Int.Cast.Lemmas import Mathlib.Data.ZMod.Basic import Mathlib.Order.Basic namespace Vector instance {ฮฑ :ฮฑ: Type uType u} {Type u: Type (u+1)n :n: โNat} : GetElem (VectorNat: Typeฮฑฮฑ: Type un) (Finn: โn)n: โฮฑ (funฮฑ: Type u__: ?m.11_ =>_: ?m.14True) where getElem := funTrue: Propvv: ?m.45ii: ?m.48_ =>_: ?m.51v.1[v: ?m.45i.val] @[simp] theorem getElem_eq_get {i: ?m.48ฮฑ :ฮฑ: Type uType u} {Type u: Type (u+1)n :n: โNat} (Nat: Typev : Vectorv: Vector ฮฑ nฮฑฮฑ: Type un) (n: โi : Fini: Fin nn) :n: โv[v: Vector ฮฑ ni] =i: Fin nv.getv: Vector ฮฑ ni := rfl end Vector namespace Bitvec def width : Bitveci: Fin nn โn: ?m.869Nat := funNat: Type_ =>_: ?m.877n -- Shouldn't this be inferred from the instance above? (as Bitvec is @[reducible]) instance {n: โn :n: โNat} : GetElem (BitvecNat: Typen) (Finn: โn)n: โBool (funBool: Type__: ?m.919_ =>_: ?m.922True) where getElem := funTrue: Propvv: ?m.948ii: ?m.951_ =>_: ?m.954v.1[v: ?m.948i.val] instance (i: ?m.951n :n: โNat) : Inhabited (BitvecNat: Typen) := โจList.replicaten: โnn: โtrue,true: BoolGoals accomplished! ๐n: โList.length (List.replicate n true) = nโฉ defGoals accomplished! ๐Fun (Fun: (width : โ) โ ?m.1584 widthwidth :width: โNat) := FinNat: Typewidth โwidth: โBool def ofInt' (Bool: Typen :n: โNat) (Nat: Typez :z: โคInt) : BitvecInt: Typen := matchn: โn with |n: โ0 => โจList.nil, rflโฉ |0: โm + 1 => Bitvec.ofIntm: โmm: โz /-- convert `Bitvec n` to `Fin n โ Bool` -/ def ofFun {z: โคwidth :width: โNat} : FunNat: Typewidth โ Bitvecwidth: โwidth := Vector.ofFn /-- convert `Fin n โ Bool` to `Bitvec n` -/ def toFun {width: โwidth :width: โNat} : BitvecNat: Typewidth โ Funwidth: โwidth := Vector.get instance {width: โwidth :width: โNat} :Nat: TypeCoe (FunCoe: semiOutParam (Sort ?u.2016) โ Sort ?u.2015 โ Sort (max(max1?u.2016)?u.2015)width) (Bitvecwidth: โwidth) := โจ@ofFunwidth: โwidthโฉ instance {width: โwidth :width: โNat} :Nat: TypeCoe (BitvecCoe: semiOutParam (Sort ?u.2097) โ Sort ?u.2096 โ Sort (max(max1?u.2097)?u.2096)width) (Funwidth: โwidth) := โจ@toFunwidth: โwidthโฉ def ofVector : Vectorwidth: โBoolBool: Typen โ Bitvecn: ?m.2175n :=n: ?m.2175id -- inspired by: https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Defining.20my.20own.20numerals -- not ideal solution, as hard to type, but should be ok for now prefix:max "๐ถ" => fun v => ofVector (Vector.consid: {ฮฑ : Sort ?u.2185} โ ฮฑ โ ฮฑfalse v) prefix:max "๐ท" => fun v => ofVector (Vector.consfalse: Booltrue v) notation:max "๐ถ" => ofVector (Vector.construe: Boolfalse (@Vector.nilfalse: BoolBool)) notation:max "๐ท" => ofVector (Vector.consBool: Typetrue (@Vector.niltrue: BoolBool)) instance : Add (BitvecBool: Typen) where add := Bitvec.add instance : Sub (Bitvecn: ?m.125043n) where sub := Bitvec.sub -- examples: -- #eval (๐ท๐ถ๐ท๐ท).toNat -- #eval (๐ถ๐ท๐ท๐ท).toNat -- #eval (๐ถ๐ท๐ท๐ท) + (๐ท๐ถ๐ท๐ท) |>.toNat -- #eval ๐ท๐ถ๐ท๐ท + ๐ถ๐ท๐ท๐ท -- #eval Bitvec.adc (๐ท๐ถ๐ท๐ท) (๐ถ๐ท๐ท๐ท) true -- #eval Bitvec.adc (๐ท๐ถ๐ท๐ท) (๐ถ๐ท๐ท๐ท) false -- #eval Bitvec.adc (๐ท๐ถ๐ท๐ท) (๐ถ๐ท๐ท๐ท) true |>.toNat -- #eval Bitvec.adc (๐ท๐ถ๐ท๐ท) (๐ถ๐ท๐ท๐ท) false |>.toNat -- -- #eval Bitvec.adc (๐ถ) (๐ถ) true -- #eval Bitvec.adc (๐ถ) (๐ถ) false def toZMod {n: ?m.125137n :n: โNat} (Nat: Typex : Bitvecx: Bitvec nn) : ZMod (n: โ2 ^2: ?m.125237n) :=n: โx.toNat theorem toZMod_val {x: Bitvec nn :n: โโ} (โ: Typev : Bitvecv: Bitvec nn) : (toZModn: โv).val =v: Bitvec nv.toNat :=v: Bitvec nGoals accomplished! ๐ZMod.val โ(Bitvec.toNat v) = Bitvec.toNat vBitvec.toNat v % 2 ^ n = Bitvec.toNat vBitvec.toNat v < 2 ^ nBitvec.toNat v < 2 ^ ndef ofZMod {Goals accomplished! ๐n :n: โโ} (x : ZMod (โ: Type2 ^2: ?m.125994n)) : Bitvecn: โn := Bitvec.ofNatn: โ_ x.val theorem toZMod_ofZMod {_: โn} (i : ZMod <|n: โ2 ^2: ?m.126158n) : (ofZMod i).toZMod = i :=n: ?m.126151ZMod.val_injectiveZMod.val_injective: โ (n : โ) [inst : NeZero n], Function.Injective ZMod.val_ (_: โGoals accomplished! ๐) theorem ofZMod_toZMod {Goals accomplished! ๐n} (n: ?m.126550v : Bitvecv: Bitvec nn) : ofZMod (toZModn: ?m.126550v) =v: Bitvec nv :=v: Bitvec nGoals accomplished! ๐Bitvec.ofNat n (Bitvec.toNat v) = vtheoremGoals accomplished! ๐foldl_addLsb_add : โ (foldl_addLsb_add: โ (n k : โ) (x : List Bool), List.foldl addLsb (n + k) x = 2 ^ List.length x * k + List.foldl addLsb n xnn: โk :k: โโ) (x : Listโ: TypeBool), x.foldl addLsb (Bool: Typen +n: โk) =k: โ2 ^ x.length *2: ?m.126703k + x.foldl addLsbk: โn |n: โn,n: โk, [] =>k: โGoals accomplished! ๐n, k: โList.foldl addLsb (n + k) [] = 2 ^ List.length [] * k + List.foldl addLsb n []|Goals accomplished! ๐n,n: โk,k: โa::l =>a: BoolGoals accomplished! ๐Goals accomplished! ๐Goals accomplished! ๐theoremGoals accomplished! ๐foldl_addLsb_eq_add_foldl_addLsb_zero (x : Listfoldl_addLsb_eq_add_foldl_addLsb_zero: โ (x : List Bool) (k : โ), List.foldl addLsb k x = 2 ^ List.length x * k + List.foldl addLsb 0 xBool) (Bool: Typek :k: โโ) : x.foldl addLsbโ: Typek =k: โ2 ^ x.length *2: ?m.129363k + x.foldl addLsbk: โ0 :=0: ?m.129392Goals accomplished! ๐List.foldl addLsb k x = 2 ^ List.length x * k + List.foldl addLsb 0 xList.foldl addLsb k x = 2 ^ List.length x * k + List.foldl addLsb 0 xList.foldl addLsb k x = List.foldl addLsb (0 + k) xList.foldl addLsb k x = 2 ^ List.length x * k + List.foldl addLsb 0 xList.foldl addLsb k x = List.foldl addLsb k xtheoremGoals accomplished! ๐foldl_addLsb_cons_zero (foldl_addLsb_cons_zero: โ (a : Bool) (x : List Bool), List.foldl addLsb 0 (a :: x) = (2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 xa :a: BoolBool) (x : ListBool: TypeBool) : (Bool: Typea::x).a: Boolfoldl addLsb0 =0: ?m.1297072^x.length * cond2: ?m.129727aa: Bool11: ?m.1297430 + x.foldl addLsb0: ?m.1297530 := calc (0: ?m.129776a::x).a: Boolfoldl addLsb0 = x.foldl addLsb (0: ?m.1299440 +0: ?m.1299680 + cond0: ?m.129979aa: Bool11: ?m.1299920) := rfl0: ?m.130002_ =_: ?mโ_ :=_: ?m.130127Goals accomplished! ๐List.foldl addLsb (0 + 0 + bif a then 1 else 0) x = (2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 xList.foldl addLsb (0 + 0 + bif a then 1 else 0) x = (2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x(2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb (0 + 0) x = (2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 xtheoremGoals accomplished! ๐toNat_adc_aux : โ {x y: ListtoNat_adc_aux: โ {x y : List Bool}, List.length x = List.length y โ List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).snd = List.foldl addLsb 0 x + List.foldl addLsb 0 yBool} (Bool: Type_h : List.length x = List.length y), List.foldl addLsb (addLsb_h: List.length x = List.length y0 (List.mapAccumrโ (fun0: ?m.130262xx: ?m.130281yy: ?m.130284c => (Bitvec.carryc: ?m.130287xx: ?m.130281yy: ?m.130284c, Bitvec.xor3c: ?m.130287xx: ?m.130281yy: ?m.130284c)) x yc: ?m.130287false).fst) (List.mapAccumrโ (funfalse: Boolxx: ?m.130318yy: ?m.130321c => (Bitvec.carryc: ?m.130324xx: ?m.130318yy: ?m.130321c, Bitvec.xor3c: ?m.130324xx: ?m.130318yy: ?m.130321c)) x yc: ?m.130324false).snd = List.foldl addLsbfalse: Bool0 x + List.foldl addLsb0: ?m.1303580 y | [], [], _ => rfl |0: ?m.130371a::x,a: Boolb::y,b: Boolh =>h: List.length (a :: x) = List.length (b :: y)Goals accomplished! ๐List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = (2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = (2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x + ((2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb 0 y)List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (List.foldl addLsb 0 x + List.foldl addLsb 0 y)List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).sndList.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (let r := List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry a b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).fst) (let r := List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry a b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).snd = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).sndList.foldl addLsb (addLsb 0 (let r := List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry a b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).fst) (let r := List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry a b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).snd = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).sndList.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst)) (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).sndList.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst)) (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + List.foldl addLsb 0 (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).sndList.foldl addLsb (addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst)) (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).sndList.foldl addLsb (addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst)) (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)List.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)
false2 ^ List.length (xor (xor false b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (false && b || false && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif false then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true2 ^ List.length (xor (xor true b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (true && b || true && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif true then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
false2 ^ List.length (xor (xor false b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (false && b || false && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif false then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true2 ^ List.length (xor (xor true b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (true && b || true && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif true then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true.false2 ^ List.length (xor (xor true false) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (true && false || true && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || false && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true false) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif true then 1 else 0) + 2 ^ List.length y * bif false then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true.true2 ^ List.length (xor (xor true true) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (true && true || true && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || true && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true true) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif true then 1 else 0) + 2 ^ List.length y * bif true then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
false.false2 ^ List.length (xor (xor false false) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (false && false || false && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || false && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false false) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif false then 1 else 0) + 2 ^ List.length y * bif false then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
false.true2 ^ List.length (xor (xor false true) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (false && true || false && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || true && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false true) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif false then 1 else 0) + 2 ^ List.length y * bif true then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true.false2 ^ List.length (xor (xor true false) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (true && false || true && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || false && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true false) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif true then 1 else 0) + 2 ^ List.length y * bif false then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true.true2 ^ List.length (xor (xor true true) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (true && true || true && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || true && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true true) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif true then 1 else 0) + 2 ^ List.length y * bif true then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)Goals accomplished! ๐2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
false.true(2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) + ((2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + ((2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)
true.false(2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) + ((2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + ((2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true.false.false(2 ^ List.length y * bif false then 0 else 1) + ((2 ^ List.length y * bif false then 1 else 0) + ((2 ^ List.length y * bif false then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif false then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)
true.false.true(2 ^ List.length y * bif true then 0 else 1) + ((2 ^ List.length y * bif true then 1 else 0) + ((2 ^ List.length y * bif true then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif true then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
false.true.false(2 ^ List.length y * bif false then 0 else 1) + ((2 ^ List.length y * bif false then 1 else 0) + ((2 ^ List.length y * bif false then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif false then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)
false.true.true(2 ^ List.length y * bif true then 0 else 1) + ((2 ^ List.length y * bif true then 1 else 0) + ((2 ^ List.length y * bif true then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif true then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)
true.false.false(2 ^ List.length y * bif false then 0 else 1) + ((2 ^ List.length y * bif false then 1 else 0) + ((2 ^ List.length y * bif false then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif false then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)
true.false.true(2 ^ List.length y * bif true then 0 else 1) + ((2 ^ List.length y * bif true then 1 else 0) + ((2 ^ List.length y * bif true then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif true then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)theoremGoals accomplished! ๐toNat_adc {toNat_adc: โ {n : โ} {x y : Bitvec n}, Bitvec.toNat (adc x y false) = Bitvec.toNat x + Bitvec.toNat yn :n: โNat} {Nat: Typexx: Bitvec ny : Bitvecy: Bitvec nn} : (Bitvec.adcn: โxx: Bitvec nyy: Bitvec nfalse).toNat =false: Boolx.toNat +x: Bitvec ny.toNat :=y: Bitvec nGoals accomplished! ๐Bitvec.toNat (adc x y false) = Bitvec.toNat x + Bitvec.toNat y
mkBitvec.toNat (adc { val := x, property := hx } y false) = Bitvec.toNat { val := x, property := hx } + Bitvec.toNat yBitvec.toNat (adc x y false) = Bitvec.toNat x + Bitvec.toNat y
mk.mkBitvec.toNat (adc { val := x, property := hx } { val := y, property := hy } false) = Bitvec.toNat { val := x, property := hx } + Bitvec.toNat { val := y, property := hy }Bitvec.toNat (adc x y false) = Bitvec.toNat x + Bitvec.toNat y
mk.mkBitvec.toNat (adc { val := x, property := (_ : List.length x = List.length x) } { val := y, property := hy } false) = Bitvec.toNat { val := x, property := (_ : List.length x = List.length x) } + Bitvec.toNat { val := y, property := hy }Bitvec.toNat (adc x y false) = Bitvec.toNat x + Bitvec.toNat y
mk.mkList.foldl addLsb (addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).fst) (List.mapAccumrโ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).snd = List.foldl addLsb 0 x + List.foldl addLsb 0 yBitvec.toNat (adc x y false) = Bitvec.toNat x + Bitvec.toNat ytheoremGoals accomplished! ๐toNat_tail : โ {toNat_tail: โ {n : โ} (x : Bitvec n), Bitvec.toNat (Vector.tail x) = Bitvec.toNat x % 2 ^ (n - 1)n :n: โNat} (Nat: Typex : Bitvecx: Bitvec nn), Bitvec.toNatn: โx.tail =x: Bitvec nx.toNat %x: Bitvec n2^(2: ?m.143492n-n: โ1) |1: ?m.1435050, โจ[], _โฉ => rfl |0: โn+n: โ1, โจ1: โa::l,a: Boolhโฉ =>h: List.length (a :: l) = n + 1Goals accomplished! ๐Bitvec.toNat (Vector.tail { val := a :: l, property := h }) = Bitvec.toNat { val := a :: l, property := h } % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h }) = Bitvec.toNat { val := a :: l, property := h } % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h })Bitvec.toNat (Vector.tail { val := a :: l, property := h }) % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h }) % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h }) = Bitvec.toNat { val := a :: l, property := h } % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := hโ }) % 2 ^ (n + 1 - 1) = Bitvec.toNat { val := a :: l, property := hโ } % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h }) = Bitvec.toNat { val := a :: l, property := h } % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h }) = Bitvec.toNat { val := a :: l, property := h } % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h }) = Bitvec.toNat { val := a :: l, property := h } % 2 ^ (n + 1 - 1)List.foldl addLsb 0 l % 2 ^ n = List.foldl addLsb 0 l % 2 ^ n@[simp] theoremGoals accomplished! ๐toNat_add {toNat_add: โ {n : โ} (x y : Bitvec n), Bitvec.toNat (x + y) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nn :n: โNat} (Nat: Typexx: Bitvec ny : Bitvecy: Bitvec nn) : (n: โx +x: Bitvec ny).toNat = (y: Bitvec nx.toNat +x: Bitvec ny.toNat) %y: Bitvec n2^2: ?m.146225n :=n: โGoals accomplished! ๐Bitvec.toNat (x + y) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nBitvec.toNat (Vector.tail (adc x y false)) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nBitvec.toNat (x + y) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nBitvec.toNat (Vector.tail (adc x y false)) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nBitvec.toNat (adc x y false) % 2 ^ (n + 1 - 1) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nBitvec.toNat (Vector.tail (adc x y false)) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ n(Bitvec.toNat x + Bitvec.toNat y) % 2 ^ (n + 1 - 1) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nBitvec.toNat (Vector.tail (adc x y false)) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ n(Bitvec.toNat x + Bitvec.toNat y) % 2 ^ n = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ ntheorem toZMod_add {Goals accomplished! ๐n :n: โโ} (โ: Typexx: Bitvec ny : Bitvecy: Bitvec nn) : (n: โx +x: Bitvec ny).toZMod = (y: Bitvec nx.toZMod +x: Bitvec ny.toZMod) :=y: Bitvec nGoals accomplished! ๐
a(Bitvec.toNat x + Bitvec.toNat y) % 2 ^ n = (Bitvec.toNat x + ZMod.val (toZMod y)) % 2 ^ n
a(Bitvec.toNat x + Bitvec.toNat y) % 2 ^ n = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ ntheorem ofZMod_add {Goals accomplished! ๐n :n: โโ} (x y : ZMod (โ: Type2 ^2: ?m.147788n)) : Bitvec.ofZMod (x + y) = Bitvec.ofZMod x + Bitvec.ofZMod y :=n: โGoals accomplished! ๐theoremGoals accomplished! ๐zero_def : (zero_def: โ {n : โ}, 0 = { val := List.replicate n false, property := (_ : List.length โ0 = n) }0 : Bitvec0: ?m.148270n) = โจList.replicaten: ?m.148264nn: ?m.148264false, (false: Bool0 : Bitvec0: ?m.148318n).2โฉ := rfl theoremn: ?m.148264toList_zero : Vector.toList (toList_zero: โ {n : โ}, Vector.toList 0 = List.replicate n false0 : Bitvec0: ?m.148366n) = List.replicaten: ?m.148357nn: ?m.148357false := rfl @[simp] theoremfalse: BooltoNat_zero : โ {toNat_zero: โ {n : โ}, Bitvec.toNat 0 = 0n :n: โNat}, (Nat: Type0 : Bitvec0: ?m.148433n).toNat =n: โ0 |0: ?m.1484650 => rfl |0: โn+1 =>n: โGoals accomplished! ๐n: โBitvec.toNat 0 = 0theoremGoals accomplished! ๐ofNat_zero : Bitvec.ofNatofNat_zero: โ {w : โ}, Bitvec.ofNat w 0 = 0ww: ?m.1493690 =0: ?m.1493740 :=0: ?m.149385Goals accomplished! ๐w: โBitvec.ofNat w 0 = 0w: โBitvec.ofNat w 0 = 0w: โBitvec.ofNat w (Bitvec.toNat 0) = 0w: โw: โBitvec.ofNat w 0 = 0@[simp] theorem toZMod_zero : โ {Goals accomplished! ๐n :n: โNat}, (Nat: Type0 : Bitvec0: ?m.149459n).toZMod =n: โ0 :=0: ?m.149507Goals accomplished! ๐@[simp] theorem ofZMod_zero : Bitvec.ofZMod (Goals accomplished! ๐0 : ZMod (0: ?m.1514332^2: ?m.151361n)) =n: ?m.1513510 :=0: ?m.151736Goals accomplished! ๐theoremGoals accomplished! ๐toList_one {toList_one: โ {n : โ}, Vector.toList 1 = List.replicate n false ++ [true]n :n: โโ} : (โ: Type1 : Bitvec (1: ?m.151914n +n: โ1)).toList = List.replicate1: ?m.151853nn: โfalse ++ [false: Booltrue] := rfl theoremtrue: BooltoNat_one : โ {toNat_one: โ {n : โ}, Bitvec.toNat 1 = if n = 0 then 0 else 1n :n: โNat}, (Nat: Type1 : Bitvec1: ?m.152071n).toNat = ifn: โn =n: โ0 then0: ?m.1521040 else0: ?m.1521291 |1: ?m.1521400 => rfl |0: โ1 => rfl |1: โn+2 =>n: โGoals accomplished! ๐n: โBitvec.toNat 1 = if n + 2 = 0 then 0 else 1Bitvec.toNat 1 = if n + 2 = 0 then 0 else 1n: โBitvec.toNat 1 = if n + 2 = 0 then 0 else 1addLsb (List.foldl addLsb (addLsb 0 false) (List.replicate n false)) true = 1n: โBitvec.toNat 1 = if n + 2 = 0 then 0 else 1addLsb (List.foldl addLsb (addLsb 0 false) (List.replicate n false)) true = 1n: โBitvec.toNat 1 = if n + 2 = 0 then 0 else 1addLsb (List.foldl addLsb (addLsb 0 false) (List.replicate n false)) true = 1addLsb (2 ^ List.length (List.replicate n false) * addLsb 0 false + List.foldl addLsb 0 (List.replicate n false)) true = 1addLsb (List.foldl addLsb (addLsb 0 false) (List.replicate n false)) true = 1n: โBitvec.toNat 1 = if n + 2 = 0 then 0 else 1@[simp] theorem toZMod_one : โ {Goals accomplished! ๐n :n: โNat}, (Nat: Type1 : Bitvec1: ?m.155230n).toZMod =n: โ1 :=1: ?m.155278Goals accomplished! ๐@[simp] theorem ofZMod_one : Bitvec.ofZMod (Goals accomplished! ๐1 : ZMod (1: ?m.1594022^2: ?m.159330n)) =n: ?m.1593201 :=1: ?m.159615Goals accomplished! ๐instance : SMulGoals accomplished! ๐โ (Bitvecโ: Typen) := โจnsmulRecโฉ theorem nsmul_def {n: ?m.159727n :n: โโ} (โ: Typex : Bitvecx: Bitvec nn) (n: โy :y: โโ) :โ: Typey โขy: โx = nsmulRecx: Bitvec nyy: โx := rfl @[simp] theorem toZMod_nsmul {x: Bitvec nn :n: โโ} (โ: Typex : Bitvecx: Bitvec nn) (n: โy :y: โโ) : (โ: Typey โขy: โx).toZMod =x: Bitvec ny โขy: โx.toZMod :=x: Bitvec nGoals accomplished! ๐Goals accomplished! ๐Goals accomplished! ๐theoremGoals accomplished! ๐toInt_sub_aux : โ {x y : ListtoInt_sub_aux: โ {x y : List Bool}, List.length x = List.length y โ (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).fst then 1 else 0) = โ(List.foldl addLsb 0 x) + -โ(List.foldl addLsb 0 y)Bool} (Bool: Type_hx : List.length x = List.length y), (โ(List.foldl addLsb_hx: List.length x = List.length y0 (List.mapAccumrโ (fun0: ?m.164935xx: ?m.164954yy: ?m.164957c => (Bitvec.carry (!c: ?m.164960x)x: ?m.164954yy: ?m.164957c, Bitvec.xor3c: ?m.164960xx: ?m.164954yy: ?m.164957c)) x yc: ?m.164960false).snd) :false: Boolโค) -โค: Type2 ^ x.length * cond (List.mapAccumrโ (fun2: ?m.165039xx: ?m.165063yy: ?m.165066c => (Bitvec.carry (!c: ?m.165069x)x: ?m.165063yy: ?m.165066c, Bitvec.xor3c: ?m.165069xx: ?m.165063yy: ?m.165066c)) x yc: ?m.165069false).fstfalse: Bool11: ?m.1650900 = โ(List.foldl addLsb0: ?m.1651000 x) + -โ(List.foldl addLsb0: ?m.1654540 y) | [], [], _ => rfl |0: ?m.165498a::x,a: Boolb::y,b: Boolh =>h: List.length (a :: x) = List.length (b :: y)Goals accomplished! ๐(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ((2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ((2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x) + -โ((2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb 0 y)(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + โ(List.foldl addLsb 0 x) + -โ((2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb 0 y)(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + โ(List.foldl addLsb 0 x) + -(โ(2 ^ List.length y * bif b then 1 else 0) + โ(List.foldl addLsb 0 y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + โ(List.foldl addLsb 0 x) + (-โ(2 ^ List.length y * bif b then 1 else 0) + -โ(List.foldl addLsb 0 y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 x) + -โ(List.foldl addLsb 0 y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).fst then 1 else 0)(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (let r := List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry (!a) b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).snd) - 2 ^ List.length (a :: x) * bif (let r := List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry (!a) b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).fst then 1 else 0)(โ(List.foldl addLsb 0 (let r := List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry (!a) b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).snd) - 2 ^ List.length (a :: x) * bif (let r := List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry (!a) b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).fst then 1 else 0)(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))(โ(List.foldl addLsb 0 (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + List.foldl addLsb 0 (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(โ(List.foldl addLsb 0 (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = โ(List.foldl addLsb 0 (a :: x)) + -โ(List.foldl addLsb 0 (b :: y))
false(โ(2 ^ List.length (xor (xor false b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (false :: x) * bif !false && b || !false && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif false then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true(โ(2 ^ List.length (xor (xor true b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (true :: x) * bif !true && b || !true && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif true then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false(โ(2 ^ List.length (xor (xor false b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (false :: x) * bif !false && b || !false && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif false then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true(โ(2 ^ List.length (xor (xor true b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (true :: x) * bif !true && b || !true && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif true then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.false(โ(2 ^ List.length (xor (xor true false) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true false) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (true :: x) * bif !true && false || !true && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || false && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif true then 1 else 0) + -โ(2 ^ List.length y * bif false then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.true(โ(2 ^ List.length (xor (xor true true) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true true) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (true :: x) * bif !true && true || !true && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || true && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif true then 1 else 0) + -โ(2 ^ List.length y * bif true then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false.false(โ(2 ^ List.length (xor (xor false false) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false false) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (false :: x) * bif !false && false || !false && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || false && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif false then 1 else 0) + -โ(2 ^ List.length y * bif false then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false.true(โ(2 ^ List.length (xor (xor false true) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false true) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (false :: x) * bif !false && true || !false && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || true && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif false then 1 else 0) + -โ(2 ^ List.length y * bif true then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.false(โ(2 ^ List.length (xor (xor true false) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true false) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (true :: x) * bif !true && false || !true && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || false && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif true then 1 else 0) + -โ(2 ^ List.length y * bif false then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.true(โ(2 ^ List.length (xor (xor true true) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true true) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (true :: x) * bif !true && true || !true && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || true && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif true then 1 else 0) + -โ(2 ^ List.length y * bif true then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.falseโ2 ^ List.length y * โ(bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) + โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) = โ2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -(2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0))(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false.falseโ2 ^ List.length y * โ(bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -((2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + 2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0)) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -(2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0)
false.true-(2 ^ List.length y + 2 ^ List.length y) + (โ2 ^ List.length y * โ(bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) + โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd)) = -โ2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -(2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0))
true.falseโ2 ^ List.length y * โ(bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) + โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) = โ2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -(2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0))
true.trueโ2 ^ List.length y * โ(bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -((2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + 2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0)) = โ2 ^ List.length y + (-โ2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -(2 ^ List.length y * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0)))(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.falseโ(bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) * 2 ^ List.length y + โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y + 2 ^ List.length y(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false.falseโ(bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y
false.trueโ(bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) * 2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + (-((bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y) - 2 ^ List.length y)
true.falseโ(bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) * 2 ^ List.length y + โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y + 2 ^ List.length y
true.trueโ(bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.true.falseโ(bif false then 1 else 0) * 2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y
true.true.trueโ(bif true then 1 else 0) * 2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false.false.falseโ(bif false then 1 else 0) * 2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y
false.false.trueโ(bif true then 1 else 0) * 2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y
false.true.falseโ(bif false then 0 else 1) * 2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + (-((bif false then 1 else 0) * 2 ^ List.length y) - 2 ^ List.length y)
false.true.trueโ(bif true then 0 else 1) * 2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + (-((bif true then 1 else 0) * 2 ^ List.length y) - 2 ^ List.length y)
true.false.falseโ(bif false then 0 else 1) * 2 ^ List.length y + โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y + 2 ^ List.length y
true.false.trueโ(bif true then 0 else 1) * 2 ^ List.length y + โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y + 2 ^ List.length y
true.true.falseโ(bif false then 1 else 0) * 2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y
true.true.trueโ(bif true then 1 else 0) * 2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.true.true2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false.false.true2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y
false.true.false2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -2 ^ List.length y
false.true.trueโ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2 = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + (-2 ^ List.length y - 2 ^ List.length y)
true.false.false2 ^ List.length y + โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + 2 ^ List.length y
true.true.true2 ^ List.length y + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y(โ(2 ^ List.length (xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = โ(2 ^ List.length x * bif a then 1 else 0) + -โ(2 ^ List.length y * bif b then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)instance (Goals accomplished! ๐n :n: โโ) : NeZero (โ: Type2 ^2: ?m.190522n) := โจNat.pos_iff_ne_zero.1 <| pow_pos (n: โGoals accomplished! ๐)Goals accomplished! ๐_โฉ theorem toZMod_sbb {_: โn :n: โโ} (โ: Typexx: Bitvec ny : Bitvecy: Bitvec nn) : (n: โx.sbbx: Bitvec nyy: Bitvec nfalse).2.toZMod =false: Boolx.toZMod -x: Bitvec ny.toZMod :=y: Bitvec nGoals accomplished! ๐
mk.mkโ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) = โ(List.foldl addLsb 0 x) - โ(List.foldl addLsb 0 y)
mk.mkโ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) = โ(List.foldl addLsb 0 x) - โ(List.foldl addLsb 0 y)Goals accomplished! ๐0 = 0Goals accomplished! ๐n: โ
x: List Bool
hx: List.length x = n
y: List Bool
hy: List.length y = n
h2n: 2 ^ n = 0
this: โ(โ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).fst then 1 else 0) = โ(โ(List.foldl addLsb 0 x) + -โ(List.foldl addLsb 0 y))
mk.mkโ(List.foldl addLsb 0 (List.mapAccumrโ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) = โ(List.foldl addLsb 0 x) - โ(List.foldl addLsb 0 y)theorem toZMod_sub {Goals accomplished! ๐n :n: โโ} (โ: Typexx: Bitvec ny : Bitvecy: Bitvec nn) : (n: โx -x: Bitvec ny).toZMod =y: Bitvec nx.toZMod -x: Bitvec ny.toZMod := toZMod_sbby: Bitvec nxx: Bitvec ny theoremy: Bitvec ntoInt_neg_aux : โ (x : ListtoInt_neg_aux: โ (x : List Bool), (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ(List.foldl addLsb 0 x)Bool), ((List.foldl addLsb (Bool: Type0 :0: ?m.199386โ) (List.mapAccumr (funโ: Typeyy: ?m.199403c => (c: ?m.199406y ||y: ?m.199403c, xorc: ?m.199406yy: ?m.199403c)) xc: ?m.199406false).snd :false: Boolโ) -โ: Type2 ^ x.length * cond (List.mapAccumr (fun2: ?m.199434yy: ?m.199456c => (c: ?m.199459y ||y: ?m.199456c, xorc: ?m.199459yy: ?m.199456c)) xc: ?m.199459false).fstfalse: Bool11: ?m.1994780 :0: ?m.199488โค) = -(List.foldl addLsbโค: Type0 x) | [] => rfl |0: ?m.199891a::x =>a: BoolGoals accomplished! ๐(โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).fst then 1 else 0) = -โ(List.foldl addLsb 0 (a :: x))(โ(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ(List.foldl addLsb 0 (a :: x))(โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).fst then 1 else 0) = -โ(List.foldl addLsb 0 (a :: x))(โ(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ(List.foldl addLsb 0 (a :: x))(โ((2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ(List.foldl addLsb 0 (a :: x))(โ(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ(List.foldl addLsb 0 (a :: x))(โ((2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ((2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x)(โ(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ(List.foldl addLsb 0 (a :: x))(โ(2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ((2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x)(โ(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ(List.foldl addLsb 0 (a :: x))(โ(2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(โ(2 ^ List.length x * bif a then 1 else 0) + โ(List.foldl addLsb 0 x))(โ(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ(List.foldl addLsb 0 (a :: x))(โ(2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ(2 ^ List.length x * bif a then 1 else 0) + -โ(List.foldl addLsb 0 x)(โ(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ(List.foldl addLsb 0 (a :: x))(โ(2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ(2 ^ List.length x * bif a then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)(โ(2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -โ(2 ^ List.length x * bif a then 1 else 0) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)(โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).fst then 1 else 0) = -โ(List.foldl addLsb 0 (a :: x))(2 ^ List.length x * โ(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * โ(bif a then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)(โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).fst then 1 else 0) = -โ(List.foldl addLsb 0 (a :: x))
false(2 ^ List.length x * โ(bif xor false (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif false || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * โ(bif false then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
true(2 ^ List.length x * โ(bif xor true (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif true || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * โ(bif true then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)(2 ^ List.length x * โ(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * โ(bif a then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
false(2 ^ List.length x * โ(bif xor false (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif false || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * โ(bif false then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
true(2 ^ List.length x * โ(bif xor true (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif true || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * โ(bif true then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)(2 ^ List.length x * โ(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * โ(bif a then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
true.false(2 ^ List.length x * โ(bif xor true false then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif true || false then 1 else 0) = -(2 ^ List.length x * โ(bif true then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif false then 1 else 0)
true.true(2 ^ List.length x * โ(bif xor true true then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif true || true then 1 else 0) = -(2 ^ List.length x * โ(bif true then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif true then 1 else 0)(2 ^ List.length x * โ(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * โ(bif a then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
false.false(2 ^ List.length x * โ(bif xor false false then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif false || false then 1 else 0) = -(2 ^ List.length x * โ(bif false then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif false then 1 else 0)
false.true(2 ^ List.length x * โ(bif xor false true then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif false || true then 1 else 0) = -(2 ^ List.length x * โ(bif false then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif true then 1 else 0)
true.false(2 ^ List.length x * โ(bif xor true false then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif true || false then 1 else 0) = -(2 ^ List.length x * โ(bif true then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif false then 1 else 0)
true.true(2 ^ List.length x * โ(bif xor true true then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif true || true then 1 else 0) = -(2 ^ List.length x * โ(bif true then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif true then 1 else 0)(2 ^ List.length x * โ(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * โ(bif a then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
true.false2 ^ List.length x + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) + (-2 ^ List.length x + -2 ^ List.length x) = -2 ^ List.length x + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)(2 ^ List.length x * โ(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * โ(bif a then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
false.true2 ^ List.length x + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) + (-2 ^ List.length x + -2 ^ List.length x) = โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) + -2 ^ List.length x
true.false2 ^ List.length x + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) + (-2 ^ List.length x + -2 ^ List.length x) = -2 ^ List.length x + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)
true.trueโ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) + (-2 ^ List.length x + -2 ^ List.length x) = -2 ^ List.length x + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) + -2 ^ List.length x)(2 ^ List.length x * โ(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * โ(bif a then 1 else 0)) + (โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)theorem toZMod_neg {Goals accomplished! ๐n :n: โโ} (โ: Typex : Bitvecx: Bitvec nn) : (-n: โx).toZMod = -x: Bitvec nx.toZMod :=x: Bitvec nGoals accomplished! ๐
mktoZMod (Bitvec.neg { val := x, property := hx }) = -toZMod { val := x, property := hx }
mkโ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) = -โ(List.foldl addLsb 0 x)
mkโ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) = -โ(List.foldl addLsb 0 x)Goals accomplished! ๐Goals accomplished! ๐n: โ
x: List Bool
hx: List.length x = n
h2n: 2 ^ n = 0
this: โ(โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = โ(-โ(List.foldl addLsb 0 x))
mkโ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) = -โ(List.foldl addLsb 0 x)x: List Bool
h2n: 2 ^ List.length x = 0
this: โ(โ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = โ(-โ(List.foldl addLsb 0 x))
mkโ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) = -โ(List.foldl addLsb 0 x)instance : SMulGoals accomplished! ๐โค (Bitvecโค: Typen) := โจzsmulRecโฉ theorem zsmul_def {n: ?m.225477n :n: โโ} (โ: Typex : Bitvecx: Bitvec nn) (n: โy :y: โคโค) :โค: Typey โขy: โคx = zsmulRecx: Bitvec nyy: โคx := rfl @[simp] theorem toZMod_zsmul {x: Bitvec nn :n: โโ} (โ: Typex : Bitvecx: Bitvec nn) (n: โy :y: โคโค) : (โค: Typey โขy: โคx).toZMod =x: Bitvec ny โขy: โคx.toZMod :=x: Bitvec nGoals accomplished! ๐Goals accomplished! ๐
negSucctoZMod (Int.negSucc y โข x) = Int.negSucc y โข toZMod xGoals accomplished! ๐instance : AddCommGroup (Bitvecinstance: {n : โ} โ AddCommGroup (Bitvec n)n) :=n: ?m.230843Function.Injective.addCommGroup toZMod (Function.Injective.addCommGroup: {Mโ : Type ?u.230850} โ {Mโ : Type ?u.230849} โ [inst : Add Mโ] โ [inst_1 : Zero Mโ] โ [inst_2 : SMul โ Mโ] โ [inst_3 : Neg Mโ] โ [inst_4 : Sub Mโ] โ [inst_5 : SMul โค Mโ] โ [inst_6 : AddCommGroup Mโ] โ (f : Mโ โ Mโ) โ Function.Injective f โ f 0 = 0 โ (โ (x y : Mโ), f (x + y) = f x + f y) โ (โ (x : Mโ), f (-x) = -f x) โ (โ (x y : Mโ), f (x - y) = f x - f y) โ (โ (x : Mโ) (n : โ), f (n โข x) = n โข f x) โ (โ (x : Mโ) (n : โค), f (n โข x) = n โข f x) โ AddCommGroup MโFunction.injective_iff_hasLeftInverse.2 โจFunction.injective_iff_hasLeftInverse: โ {ฮฑ : Sort ?u.231282} {ฮฒ : Sort ?u.231283} [inst : Nonempty ฮฑ] {f : ฮฑ โ ฮฒ}, Function.Injective f โ Function.HasLeftInverse f_, ofZMod_toZModโฉ) toZMod_zero toZMod_add toZMod_neg toZMod_sub toZMod_nsmul toZMod_zsmul -- see https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Pattern.20matching.20subtypes def add? {_: ?m.231348n :n: โNat} (Nat: Typexx: Bitvec ny : Bitvecy: Bitvec nn) : Option (Bitvecn: โn) := match Bitvec.adcn: โxx: Bitvec nyy: Bitvec nfalse with | โจfalse: Boolfalse :: z,false: Boolhconsโฉ => some โจz,hcons: List.length (false :: z) = n + 1Goals accomplished! ๐โฉ | _ => none -- overflow theorem {Goals accomplished! ๐n :n: โNat} {Nat: Typexx: Bitvec nyy: Bitvec nz : Bitvecz: Bitvec nn} : add?n: โxx: Bitvec ny = somey: Bitvec nz โz: Bitvec nx +x: Bitvec ny =y: Bitvec nz :=z: Bitvec nsorry /- #eval (๐ท๐ถ๐ท๐ท).toNat * (๐ท๐ถ๐ท๐ท).toNat #eval Bitvec.mul (๐ท๐ถ๐ท๐ท) (๐ท๐ถ๐ท๐ท) |>.toNat -/ protected def mul? {sorry: ?m.233532n :n: โNat} (Nat: Typexx: Bitvec ny : Bitvecy: Bitvec nn) : Option (Bitvecn: โn) := do letn: โff: (r : ?m.233571) โ (b : ?m.233579 r) โ ?m.233580 r brr: ?m.233571b := do letb: ?m.233574opโ โ Bitvec.add?opโ: ?m.233736rr: ?m.233571r letr: ?m.233571opโ โ Bitvec.add?opโ: ?m.233784opโopโ: ?m.233736y return condy: Bitvec nbb: ?m.233574opโopโ: ?m.233784opโ (opโ: ?m.233736x.toList).x: Bitvec nfoldlMff: (r : ?m.233571) โ (b : ?m.233579 r) โ ?m.233580 r b0 /- #eval Bitvec.mul? (๐ท๐ถ๐ท๐ท) (๐ท๐ถ๐ท๐ท) #eval Bitvec.mul? (๐ถ๐ถ๐ถ๐ถ๐ถ๐ถ๐ท๐ถ๐ท๐ท) (๐ถ๐ถ๐ถ๐ถ๐ถ๐ถ๐ท๐ถ๐ท๐ท) |>.get!|>.toNat -/ theorem : โ {0: ?m.233650n :n: โNat} {Nat: Typexx: Bitvec nyy: Bitvec nz : Bitvecz: Bitvec nn}, Bitvec.mul?n: โxx: Bitvec ny = somey: Bitvec nz โz: Bitvec nx *x: Bitvec ny =y: Bitvec nz :=z: Bitvec nsorry /-- The value produced is the unsigned integer quotient of the two operands. Note that unsigned integer division and signed integer division are distinct operations; for signed integer division, use โsdivโ. Division by zero is undefined behavior. -/ def udiv? {sorry: ?m.234343w :w: โNat} (Nat: Typexx: Bitvec wy : Bitvecy: Bitvec ww) : Option $ Bitvecw: โw := matchw: โy.toNat with |y: Bitvec w0 => none | _ => some $ Bitvec.ofNat0: โw (w: โx.toNat /x: Bitvec wy.toNat) /-- The value produced is the signed integer quotient of the two operands rounded towards zero. Note that signed integer division and unsigned integer division are distinct operations; for unsigned integer division, use โudivโ. Division by zero is undefined behavior. Overflow also leads to undefined behavior; this is a rare case, but can occur, for example, by doing a 32-bit division of -2147483648 by -1. -/ def sdiv? {y: Bitvec ww :w: โNat} (Nat: Typexx: Bitvec wy : Bitvecy: Bitvec ww) : Option $ Bitvecw: โw := ifw: โy.toInt =y: Bitvec w0 then none else some $ Bitvec.ofInt'0: ?m.234734w (w: โx.toInt /x: Bitvec wy.toInt) /-- If the condition is an i1 and it evaluates to 1, the instruction returns the first value argument; otherwise, it returns the second value argument. -/ def select {y: Bitvec ww :w: โNat} (Nat: Typec : Bitvecc: Bitvec 11) (1: ?m.234951xx: Bitvec wy : Bitvecy: Bitvec ww) : Bitvecw: โw := condw: โc.headc: Bitvec 1xx: Bitvec wy theorem bitwise_eq_eq {y: Bitvec ww :w: โNat} {Nat: Typexx: Bitvec wy : Bitvecy: Bitvec ww} : (forallw: โi : Fini: Fin ww,w: โx[x: Bitvec wi] =i: Fin wy[y: Bitvec wi]) โi: Fin wx =x: Bitvec wy := โจy: Bitvec wVector.ext, funVector.ext: โ {n : โ} {ฮฑ : Type ?u.235454} {v w : Vector ฮฑ n}, (โ (m : Fin n), Vector.get v m = Vector.get w m) โ v = whh: ?m.235489_ =>_: ?m.235492h โธ rflโฉ theoremh: ?m.235489ext_get? {ext_get?: โ {w : โ} {x y : Bitvec w}, (โ (i : โ), List.get? (Vector.toList x) i = List.get? (Vector.toList y) i) โ x = yw :w: โNat} {Nat: Typexx: Bitvec wy : Bitvecy: Bitvec ww} (w: โh : โh: โ (i : โ), List.get? (Vector.toList x) i = List.get? (Vector.toList y) ii,i: ?m.235528x.toList.get?x: Bitvec wi =i: ?m.235528y.toList.get?y: Bitvec wi) :i: ?m.235528x =x: Bitvec wy :=y: Bitvec wGoals accomplished! ๐x = yx: List Bool
y: Bitvec (List.length x)
h: โ (i : โ), List.get? (Vector.toList { val := x, property := (_ : List.length x = List.length x) }) i = List.get? (Vector.toList y) i
mk{ val := x, property := (_ : List.length x = List.length x) } = yx = yx, y: List Bool
hy: List.length y = List.length x
h: โ (i : โ), List.get? (Vector.toList { val := x, property := (_ : List.length x = List.length x) }) i = List.get? (Vector.toList { val := y, property := hy }) i
mk.mk{ val := x, property := (_ : List.length x = List.length x) } = { val := y, property := hy }x = y@[simp] theoremGoals accomplished! ๐toList_cong {toList_cong: โ {wโ wโ : โ} (h : wโ = wโ) (b : Bitvec wโ), Vector.toList (Bitvec.cong h b) = Vector.toList bwโwโ: โwโ :wโ: โNat} (Nat: Typeh :h: wโ = wโwโ =wโ: โwโ) (wโ: โb : Bitvecb: Bitvec wโwโ) : (Bitvec.congwโ: โhh: wโ = wโb).toList =b: Bitvec wโb.toList :=b: Bitvec wโGoals accomplished! ๐Vector.toList (Bitvec.cong h b) = Vector.toList bVector.toList (Bitvec.cong (_ : wโ = wโ) b) = Vector.toList bVector.toList (Bitvec.cong (_ : wโ = wโ) b) = Vector.toList bVector.toList (Bitvec.cong h b) = Vector.toList btheoremGoals accomplished! ๐get?_shl (x : Bitvecx: Bitvec nn) (n: ?m.235775ii: โj :j: โโ) : (โ: Typex.shlx: Bitvec ni).toList.get?i: โj = ifj: โi +i: โj <j: โn thenn: ?m.235775x.toList.get? (x: Bitvec ni +i: โj) else ifj: โj <j: โn thenn: ?m.235775false else none :=false: BoolGoals accomplished! ๐List.get? (Vector.toList (Bitvec.cong (_ : n - i + min n i = n) (Vector.append (Vector.drop i x) (Vector.replicate (min n i) false)))) j = if i + j < n then List.get? (Vector.toList x) (i + j) else if j < n then some false else none
mkList.get? (Vector.toList (Bitvec.cong (_ : List.length x - i + min (List.length x) i = List.length x) (Vector.append (Vector.drop i { val := x, property := (_ : List.length x = List.length x) }) (Vector.replicate (min (List.length x) i) false)))) j = if i + j < List.length x then List.get? (Vector.toList { val := x, property := (_ : List.length x = List.length x) }) (i + j) else if j < List.length x then some false else none
mkList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = if i + j < List.length x then List.get? x (i + j) else if j < List.length x then some false else none
mk.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = List.get? x (i + j)
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = List.get? x (i + j)
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inlj < List.length (List.drop i x)
mk.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = List.get? x (i + j)
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inlj < List.length (List.drop i x)
mk.inlj < List.length (List.drop i x)
mk.inlj < List.length (List.drop i x)
mk.inlj < List.length x - i
mk.inlj < List.length x - i
mk.inlj < List.length (List.drop i x)Goals accomplished! ๐
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inlList.get? (List.replicate (min (List.length x) i) false) (j - List.length (List.drop i x)) = some false
mk.inr.inlList.length (List.drop i x) โค j
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inlsome (List.get (List.replicate (min (List.length x) i) false) { val := j - List.length (List.drop i x), isLt := ?mk.inr.inl }) = some false
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlList.length (List.drop i x) โค j
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inl
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlList.length (List.drop i x) โค j
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlList.length (List.drop i x) โค j
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlList.length (List.drop i x) โค j
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)Goals accomplished! ๐List.length (List.drop i x) โค jGoals accomplished! ๐
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)Goals accomplished! ๐j < List.length (List.drop i x) + List.length (List.replicate (min (List.length x) i) false)Goals accomplished! ๐Goals accomplished! ๐
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inlList.length (List.drop i x) โค j
mk.inr.inlList.length (List.drop i x) โค jGoals accomplished! ๐
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inrList.length (List.drop i x ++ List.replicate (min (List.length x) i) false) โค j
mk.inr.inrList.length (List.drop i x ++ List.replicate (min (List.length x) i) false) โค j
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = noneGoals accomplished! ๐theoremGoals accomplished! ๐get?_ushr (get?_ushr: โ {n : โ} (x : Bitvec n) (i j : โ), List.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else nonex : Bitvecx: Bitvec nn) (n: ?m.243378ii: โj :j: โโ) : (โ: Typex.ushrx: Bitvec ni).toList.get?i: โj = ifj: โj <j: โx.length then ifx: Bitvec nj <j: โi then somei: โfalse elsefalse: Boolx.toList.get? (x: Bitvec nj -j: โi) else none :=i: โGoals accomplished! ๐List.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else noneList.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else none
mkList.get? (Vector.toList (fillShr { val := x, property := (_ : List.length x = List.length x) } i false)) j = if j < Vector.length { val := x, property := (_ : List.length x = List.length x) } then if j < i then some false else List.get? (Vector.toList { val := x, property := (_ : List.length x = List.length x) }) (j - i) else noneList.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else none
mkList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = if j < Vector.length { val := x, property := (_ : List.length x = List.length x) } then if j < i then some false else List.get? x (j - i) else noneList.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else nonei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = noneList.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else nonei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false) j = some falsei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlsome (List.get (List.replicate (min (List.length x) i) false) { val := j, isLt := ?mk.inl.inl }) = some falsei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inli, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)Goals accomplished! ๐i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)Goals accomplished! ๐i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = noneList.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else nonei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.get? (List.replicate i false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.get? (List.take (List.length x - i) x) (j - List.length (List.replicate i false)) = List.get? x (j - i)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) โค ji, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.get? x (j - List.length (List.replicate i false)) = List.get? x (j - i)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - ii, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) โค ji, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.get? x (j - List.length (List.replicate i false)) = List.get? x (j - i)i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - ii, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) โค ji, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - ii, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) โค ji, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - ii, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - ii, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) โค ji, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - iGoals accomplished! ๐i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length xList.length (List.replicate i false) โค jGoals accomplished! ๐i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - iGoals accomplished! ๐i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length xj < List.length (List.replicate i false) + (List.length x - i)Goals accomplished! ๐Goals accomplished! ๐i, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) โค ji, j: โ
x: List Bool
hโ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hโ: ยฌj < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) โค jGoals accomplished! ๐i, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = noneList.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else nonei, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (if List.length x โค i then List.length x else i) false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (if List.length x โค i then List.length x else i) false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: List.length x โค i
mk.inr.inlList.length (List.replicate (List.length x) false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: ยฌList.length x โค i
mk.inr.inrList.length (List.replicate i false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: List.length x โค i
mk.inr.inlList.length (List.replicate (List.length x) false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: List.length x โค i
mk.inr.inlList.length (List.replicate (List.length x) false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: ยฌList.length x โค i
mk.inr.inrList.length (List.replicate i false ++ List.take (List.length x - i) x) โค jGoals accomplished! ๐i, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: ยฌList.length x โค i
mk.inr.inrList.length (List.replicate i false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: ยฌList.length x โค i
mk.inr.inrList.length (List.replicate i false ++ List.take (List.length x - i) x) โค ji, j: โ
x: List Bool
hโ: ยฌj < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: ยฌList.length x โค i
mk.inr.inrList.length (List.replicate i false ++ List.take (List.length x - i) x) โค jGoals accomplished! ๐Goals accomplished! ๐theoremGoals accomplished! ๐get?_and (get?_and: โ {n : โ} (x y : Bitvec n) (i : โ), List.get? (Vector.toList (Bitvec.and x y)) i = do let __do_lift โ List.get? (Vector.toList x) i let __do_lift_1 โ List.get? (Vector.toList y) i pure (__do_lift && __do_lift_1)xx: Bitvec ny : Bitvecy: Bitvec nn) (n: ?m.261948i :i: โโ) : (โ: Typex.andx: Bitvec ny).toList.get?y: Bitvec ni = do returni: โ(โ(โ x.toList.get? i): ?m.262050xx: Bitvec n.toList(โ x.toList.get? i): ?m.262050.get?(โ x.toList.get? i): ?m.262050(โ x.toList.get? i): ?m.262050ii: โ) &&(โ x.toList.get? i): ?m.262050(โ(โ y.toList.get? i): ?m.262105yy: Bitvec n.toList(โ y.toList.get? i): ?m.262105.get?(โ y.toList.get? i): ?m.262105(โ y.toList.get? i): ?m.262105ii: โ) :=(โ y.toList.get? i): ?m.262105Goals accomplished! ๐List.get? (Vector.toList (Bitvec.and x y)) i = do let __do_lift โ List.get? (Vector.toList x) i let __do_lift_1 โ List.get? (Vector.toList y) i pure (__do_lift && __do_lift_1)
mkList.get? (Vector.toList (Bitvec.and { val := x, property := (_ : List.length x = List.length x) } y)) i = do let __do_lift โ List.get? (Vector.toList { val := x, property := (_ : List.length x = List.length x) }) i let __do_lift_1 โ List.get? (Vector.toList y) i pure (__do_lift && __do_lift_1)List.get? (Vector.toList (Bitvec.and x y)) i = do let __do_lift โ List.get? (Vector.toList x) i let __do_lift_1 โ List.get? (Vector.toList y) i pure (__do_lift && __do_lift_1)
mk.mkList.get? (Vector.toList (Bitvec.and { val := x, property := (_ : List.length x = List.length x) } { val := y, property := hy })) i = do let __do_lift โ List.get? (Vector.toList { val := x, property := (_ : List.length x = List.length x) }) i let __do_lift_1 โ List.get? (Vector.toList { val := y, property := hy }) i pure (__do_lift && __do_lift_1)List.get? (Vector.toList (Bitvec.and x y)) i = do let __do_lift โ List.get? (Vector.toList x) i let __do_lift_1 โ List.get? (Vector.toList y) i pure (__do_lift && __do_lift_1)
mk.mk(Option.bind (Option.map and (List.get? x i)) fun g => Option.map g (List.get? y i)) = do let __do_lift โ List.get? x i let __do_lift_1 โ List.get? y i pure (__do_lift && __do_lift_1)List.get? (Vector.toList (Bitvec.and x y)) i = do let __do_lift โ List.get? (Vector.toList x) i let __do_lift_1 โ List.get? (Vector.toList y) i pure (__do_lift && __do_lift_1)
mk.mk.none(Option.bind (Option.map and none) fun g => Option.map g (List.get? y i)) = do let __do_lift โ none let __do_lift_1 โ List.get? y i pure (__do_lift && __do_lift_1)
mk.mk.some(Option.bind (Option.map and (some valโ)) fun g => Option.map g (List.get? y i)) = do let __do_lift โ some valโ let __do_lift_1 โ List.get? y i pure (__do_lift && __do_lift_1)
mk.mk(Option.bind (Option.map and (List.get? x i)) fun g => Option.map g (List.get? y i)) = do let __do_lift โ List.get? x i let __do_lift_1 โ List.get? y i pure (__do_lift && __do_lift_1)
mk.mk.none(Option.bind (Option.map and none) fun g => Option.map g (List.get? y i)) = do let __do_lift โ none let __do_lift_1 โ List.get? y i pure (__do_lift && __do_lift_1)
mk.mk.some(Option.bind (Option.map and (some valโ)) fun g => Option.map g (List.get? y i)) = do let __do_lift โ some valโ let __do_lift_1 โ List.get? y i pure (__do_lift && __do_lift_1)
mk.mk(Option.bind (Option.map and (List.get? x i)) fun g => Option.map g (List.get? y i)) = do let __do_lift โ List.get? x i let __do_lift_1 โ List.get? y i pure (__do_lift && __do_lift_1)
mk.mk.some.none(Option.bind (Option.map and (some valโ)) fun g => Option.map g none) = do let __do_lift โ some valโ let __do_lift_1 โ none pure (__do_lift && __do_lift_1)
mk.mk.some.some(Option.bind (Option.map and (some valโยน)) fun g => Option.map g (some valโ)) = do let __do_lift โ some valโยน let __do_lift_1 โ some valโ pure (__do_lift && __do_lift_1)
mk.mk(Option.bind (Option.map and (List.get? x i)) fun g => Option.map g (List.get? y i)) = do let __do_lift โ List.get? x i let __do_lift_1 โ List.get? y i pure (__do_lift && __do_lift_1)
mk.mk.none.none(Option.bind (Option.map and none) fun g => Option.map g none) = do let __do_lift โ none let __do_lift_1 โ none pure (__do_lift && __do_lift_1)
mk.mk.none.some(Option.bind (Option.map and none) fun g => Option.map g (some valโ)) = do let __do_lift โ none let __do_lift_1 โ some valโ pure (__do_lift && __do_lift_1)
mk.mk.some.none(Option.bind (Option.map and (some valโ)) fun g => Option.map g none) = do let __do_lift โ some valโ let __do_lift_1 โ none pure (__do_lift && __do_lift_1)
mk.mk.some.some(Option.bind (Option.map and (some valโยน)) fun g => Option.map g (some valโ)) = do let __do_lift โ some valโยน let __do_lift_1 โ some valโ pure (__do_lift && __do_lift_1)
mk.mk(Option.bind (Option.map and (List.get? x i)) fun g => Option.map g (List.get? y i)) = do let __do_lift โ List.get? x i let __do_lift_1 โ List.get? y i pure (__do_lift && __do_lift_1)theoremGoals accomplished! ๐get?_ofInt_neg_one : (Bitvec.ofIntget?_ofInt_neg_one: โ {w i : โ}, List.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i โค w then some true else nonew (-w: ?m.3132131)).toList.get?1: ?m.313262i = ifi: ?m.313256i โคi: ?m.313256w then somew: ?m.313213true else none :=true: BoolGoals accomplished! ๐w, i: โList.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i โค w then some true else nonew, i: โList.get? (Vector.toList (true ::แตฅ Bitvec.not (Bitvec.ofNat w 0))) i = if i โค w then some true else nonew, i: โList.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i โค w then some true else nonew, i: โList.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i โค w then some true else nonew, i: โList.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i โค w then some true else nonew, i: โList.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i โค w then some true else none
inli < List.length (List.replicate (w + 1) true)
inli < List.length (List.replicate (w + 1) true)
inli < List.length (List.replicate (w + 1) true)
inli < List.length (List.replicate (w + 1) true)Goals accomplished! ๐w, i: โList.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i โค w then some true else none
inrList.length (List.replicate (w + 1) true) โค i
inrList.length (List.replicate (w + 1) true) โค iGoals accomplished! ๐-- from InstCombine/Shift:279 theoremGoals accomplished! ๐shl_ushr_eq_and_shl {shl_ushr_eq_and_shl: โ {w : โ} {x C : Bitvec (Nat.succ w)}, shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))w :w: โNat} {x C : BitvecNat: Typew.succ} : Bitvec.shl (Bitvec.ushr x C.toNat) C.toNat = Bitvec.and x (Bitvec.shl (Bitvec.ofIntw: โw (-w: โ1)) C.toNat) :=1: ?m.316004Goals accomplished! ๐shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))
hโ (i : โ), List.get? (Vector.toList (shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C))) i = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) ishl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))
hList.get? (Vector.toList (shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C))) i = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) ishl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))
hList.get? (Vector.toList (shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C))) i = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) i
h(if Bitvec.toNat C + i < Nat.succ w then List.get? (Vector.toList (ushr x (Bitvec.toNat C))) (Bitvec.toNat C + i) else if i < Nat.succ w then some false else none) = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) i
hList.get? (Vector.toList (shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C))) i = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) i
h(if Bitvec.toNat C + i < Nat.succ w then if Bitvec.toNat C + i < Vector.length x then if Bitvec.toNat C + i < Bitvec.toNat C then some false else List.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) else none else if i < Nat.succ w then some false else none) = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) i
hList.get? (Vector.toList (shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C))) i = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) i
h(if Bitvec.toNat C + i < Nat.succ w then if Bitvec.toNat C + i < Vector.length x then if Bitvec.toNat C + i < Bitvec.toNat C then some false else List.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) else none else if i < Nat.succ w then some false else none) = do let __do_lift โ List.get? (Vector.toList x) i let __do_lift_1 โ List.get? (Vector.toList (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))) i pure (__do_lift && __do_lift_1)
h(if Bitvec.toNat C + i < Nat.succ w then if Bitvec.toNat C + i < Vector.length x then if Bitvec.toNat C + i < Bitvec.toNat C then some false else List.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) else none else if i < Nat.succ w then some false else none) = do let __do_lift โ List.get? (Vector.toList x) i let __do_lift_1 โ List.get? (Vector.toList (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))) i pure (__do_lift && __do_lift_1)shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))
h(if Bitvec.toNat C + i โค w then if Bitvec.toNat C + i โค w then if Bitvec.toNat C + i < Bitvec.toNat C then some false else List.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) else none else if i โค w then some false else none) = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (if Bitvec.toNat C + i โค w then if Bitvec.toNat C + i โค w then some true else none else if i โค w then some false else none) fun __do_lift_1 => some (__do_lift && __do_lift_1)shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))w: โ
x, C: Bitvec (Nat.succ w)
i: โ
hโ: Bitvec.toNat C + i โค w
hโ: Bitvec.toNat C + i < Bitvec.toNat C
h.inl.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)w: โ
x, C: Bitvec (Nat.succ w)
i: โ
hโ: Bitvec.toNat C + i โค w
hโ: ยฌBitvec.toNat C + i < Bitvec.toNat C
h.inl.inrList.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))w: โ
x, C: Bitvec (Nat.succ w)
i: โ
hโ: Bitvec.toNat C + i โค w
hโ: Bitvec.toNat C + i < Bitvec.toNat C
h.inl.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)w: โ
x, C: Bitvec (Nat.succ w)
i: โ
hโ: Bitvec.toNat C + i โค w
hโ: Bitvec.toNat C + i < Bitvec.toNat C
h.inl.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)w: โ
x, C: Bitvec (Nat.succ w)
i: โ
hโ: Bitvec.toNat C + i โค w
hโ: ยฌBitvec.toNat C + i < Bitvec.toNat C
h.inl.inrList.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)Goals accomplished! ๐w: โ
x, C: Bitvec (Nat.succ w)
i: โ
hโ: Bitvec.toNat C + i โค w
hโ: ยฌBitvec.toNat C + i < Bitvec.toNat C
h.inl.inrList.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))w: โ
x, C: Bitvec (Nat.succ w)
i: โ
hโ: Bitvec.toNat C + i โค w
hโ: ยฌBitvec.toNat C + i < Bitvec.toNat C
h.inl.inrList.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)w: โ
x, C: Bitvec (Nat.succ w)
i: โ
hโ: Bitvec.toNat C + i โค w
hโ: ยฌBitvec.toNat C + i < Bitvec.toNat C
h.inl.inrList.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)Goals accomplished! ๐
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (some (List.get (Vector.toList x) { val := i, isLt := ?h.inr.inl })) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inli < List.length (Vector.toList x)
h.inr.inlsome false = Option.bind (some (List.get (Vector.toList x) { val := i, isLt := ?h.inr.inl })) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inli < List.length (Vector.toList x)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (some (List.get (Vector.toList x) { val := i, isLt := ?h.inr.inl })) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inli < List.length (Vector.toList x)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)Goals accomplished! ๐
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind none fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrList.length (Vector.toList x) โค i
h.inr.inrnone = Option.bind none fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrList.length (Vector.toList x) โค i
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind none fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrList.length (Vector.toList x) โค i
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)Goals accomplished! ๐
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)Goals accomplished! ๐-- A lot of this should probably go to a differet file here and not Mathlib inductive Refinement {Goals accomplished! ๐w :w: โNat} : Option (BitvecNat: Typew) โ Option (Bitvecw: โw) โw: โProp | bothSome {Prop: Typexx: Bitvec wy : Bitvecy: Bitvec ww } :w: โx =x: Bitvec wy โ Refinement (somey: Bitvec wx) (somex: Bitvec wy) |y: Bitvec wnoneAny {x? : Option (BitvecnoneAny: โ {w : โ} {x? : Option (Bitvec w)}, Refinement none x?w)} : Refinement none x? theoremw: โRefinement.refl {Refinement.refl: โ {w : โ} (x : Option (Bitvec w)), Refinement x xw :w: โNat} :โ x : Option (BitvecNat: Typew), Refinement x x :=w: โGoals accomplished! ๐w: โโ (x : Option (Bitvec w)), Refinement x xRefinement x xw: โโ (x : Option (Bitvec w)), Refinement x xw: โ
noneRefinement none none
someRefinement (some valโ) (some valโ)w: โโ (x : Option (Bitvec w)), Refinement x x
someRefinement (some valโ) (some valโ)w: โโ (x : Option (Bitvec w)), Refinement x xw: โโ (x : Option (Bitvec w)), Refinement x xtheoremGoals accomplished! ๐Refinement.trans {Refinement.trans: โ {w : โ} (x y z : Option (Bitvec w)), Refinement x y โ Refinement y z โ Refinement x zw :w: โNat} : โ x y z : Option (BitvecNat: Typew), Refinement x y โ Refinement y z โ Refinement x z :=w: โGoals accomplished! ๐w: โโ (x y z : Option (Bitvec w)), Refinement x y โ Refinement y z โ Refinement x zRefinement x zw: โโ (x y z : Option (Bitvec w)), Refinement x y โ Refinement y z โ Refinement x z
bothSomeRefinement (some xโ) z
noneAnyRefinement none zRefinement x z
bothSomeRefinement (some xโ) z
noneAnyRefinement none zRefinement x z
noneAny.bothSomeRefinement none (some yโ)
noneAny.noneAnyRefinement none zRefinement x zRefinement x z
noneAny.noneAnyRefinement none z
noneAny.bothSomeRefinement none (some yโ)
noneAny.noneAnyRefinement none zGoals accomplished! ๐w: โโ (x y z : Option (Bitvec w)), Refinement x y โ Refinement y z โ Refinement x zw: โโ (x y z : Option (Bitvec w)), Refinement x y โ Refinement y z โ Refinement x zw: โโ (x y z : Option (Bitvec w)), Refinement x y โ Refinement y z โ Refinement x zw: โโ (x y z : Option (Bitvec w)), Refinement x y โ Refinement y z โ Refinement x zw: โโ (x y z : Option (Bitvec w)), Refinement x y โ Refinement y z โ Refinement x zGoals accomplished! ๐instance {instance: {w : โ} โ DecidableEq (Bitvec w)w :w: โNat} : DecidableEq (BitvecNat: Typew) :=w: โinferInstanceinferInstance: {ฮฑ : Sort ?u.332414} โ [i : ฮฑ] โ ฮฑinstance {instance: {w : โ} โ DecidableRel Refinementw :w: โNat} : DecidableRel (@RefinementNat: Typew) :=w: โGoals accomplished! ๐w: โDecidableRel RefinementDecidable (Refinement x y)w: โDecidableRel RefinementDecidable (Refinement x y)Decidable (Refinement x y)w: โDecidableRel Refinementw: โ
none.noneDecidable (Refinement none none)w: โ
none.noneDecidable (Refinement none none)
none.someDecidable (Refinement none (some valโ))
some.noneDecidable (Refinement (some valโ) none)
some.someDecidable (Refinement (some valโยน) (some valโ))w: โ
none.none.hRefinement none nonew: โ
none.none.hRefinement none nonew: โ
none.noneDecidable (Refinement none none)
none.someDecidable (Refinement none (some valโ))
some.noneDecidable (Refinement (some valโ) none)
some.someDecidable (Refinement (some valโยน) (some valโ))Goals accomplished! ๐w: โDecidableRel Refinement
none.someDecidable (Refinement none (some valโ))
none.some.hRefinement none (some valโ)
none.some.hRefinement none (some valโ)Goals accomplished! ๐w: โDecidableRel Refinement
some.noneDecidable (Refinement (some valโ) none)
some.none.hยฌRefinement (some valโ) none
some.none.hยฌRefinement (some valโ) none
some.none.h
some.none.hGoals accomplished! ๐w: โDecidableRel RefinementGoals accomplished! ๐Goals accomplished! ๐Goals accomplished! ๐instance {Goals accomplished! ๐w :w: โNat} : LE (Option (BitvecNat: Typew)) := โจRefinementโฉ instance {w: โw :w: โNat} : LT (Option (BitvecNat: Typew)) := โจ funw: โxx: ?m.333775y =>y: ?m.333778x โคx: ?m.333775y โง ยฌy: ?m.333778y โคy: ?m.333778x โฉ instance {x: ?m.333775w :w: โNat} : Preorder (Option $ BitvecNat: Typew) where le := Refinement le_refl :=w: โRefinement.refl le_trans :=Refinement.refl: โ {w : โ} (x : Option (Bitvec w)), Refinement x xRefinement.trans theoremRefinement.trans: โ {w : โ} (x y z : Option (Bitvec w)), Refinement x y โ Refinement y z โ Refinement x ztoInt_injective : โ {toInt_injective: โ {w : โ}, Function.Injective Bitvec.toIntw :w: โNat}, Function.Injective (Bitvec.toInt : BitvecNat: Typew โw: โโค) |โค: Type0, โจ[],0: โ_โฉ, โจ[], _โฉ, rfl => rfl |_: List.length [] = 0n+n: โ1, โจ1: โa::x,a: Boolhxโฉ, โจhx: List.length (a :: x) = n + 1b::y,b: Boolhyโฉ,hy: List.length (b :: y) = n + 1h =>h: Bitvec.toInt { val := a :: x, property := hx } = Bitvec.toInt { val := b :: y, property := hy }Goals accomplished! ๐n: โ
a: Bool
x: List Bool
hx: List.length (a :: x) = n + 1
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
h: (bif a then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := a :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := a :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))n: โ
a: Bool
x: List Bool
hx: List.length (a :: x) = n + 1
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
h: (bif a then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := a :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := a :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
aVector.toList { val := a :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: โ
x: List Bool
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
hx: List.length (false :: x) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
a.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: โ
x: List Bool
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
hx: List.length (true :: x) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
a.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: โ
a: Bool
x: List Bool
hx: List.length (a :: x) = n + 1
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
h: (bif a then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := a :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := a :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
aVector.toList { val := a :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: โ
x: List Bool
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
hx: List.length (false :: x) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
a.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: โ
x: List Bool
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
hx: List.length (true :: x) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
a.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: โ
a: Bool
x: List Bool
hx: List.length (a :: x) = n + 1
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
h: (bif a then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := a :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := a :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
aVector.toList { val := a :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.false.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.false.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.false.trueVector.toList { val := false :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: Bitvec.toNat { val := x, property := (_ : Nat.pred (List.length (false :: x)) = Nat.pred (Nat.succ (n + 0))) } = Bitvec.toNat { val := y, property := (_ : Nat.pred (List.length (false :: y)) = Nat.pred (Nat.succ (n + 0))) }
a.false.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.false.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.false.trueVector.toList { val := false :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (Vector.toList โ Bitvec.ofNat n) (Bitvec.toNat { val := x, property := (_ : Nat.pred (List.length (false :: x)) = Nat.pred (Nat.succ (n + 0))) }) = (Vector.toList โ Bitvec.ofNat n) (Bitvec.toNat { val := y, property := (_ : Nat.pred (List.length (false :: y)) = Nat.pred (Nat.succ (n + 0))) })
a.false.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.false.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.false.trueVector.toList { val := false :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }Goals accomplished! ๐n: โ
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.false.trueVector.toList { val := false :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.false.trueVector.toList { val := false :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.false.trueVector.toList { val := false :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }Goals accomplished! ๐n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }Goals accomplished! ๐n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: Bitvec.toNat (Bitvec.not { val := x, property := (_ : Nat.pred (List.length (true :: x)) = Nat.pred (Nat.succ (n + 0))) }) = Bitvec.toNat (Bitvec.not { val := y, property := (_ : Nat.pred (List.length (true :: y)) = Nat.pred (Nat.succ (n + 0))) })
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (Vector.toList โ Bitvec.ofNat n) (Bitvec.toNat (Bitvec.not { val := x, property := (_ : Nat.pred (List.length (true :: x)) = Nat.pred (Nat.succ (n + 0))) })) = (Vector.toList โ Bitvec.ofNat n) (Bitvec.toNat (Bitvec.not { val := y, property := (_ : Nat.pred (List.length (true :: y)) = Nat.pred (Nat.succ (n + 0))) }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: โ
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else โ(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else โ(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }Goals accomplished! ๐theoremGoals accomplished! ๐toInt_zero {toInt_zero: โ {w : โ}, Bitvec.toInt 0 = 0w :w: โNat} : (Nat: Type0 : Bitvec0: ?m.340421w).toInt =w: โ0 :=0: ?m.340453Goals accomplished! ๐w: โBitvec.toInt 0 = 0w: โ(match w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else โ(Bitvec.toNat (Vector.tail v))) = 0w: โBitvec.toInt 0 = 0
zero(match Nat.zero, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else โ(Bitvec.toNat (Vector.tail v))) = 0w: โ
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else โ(Bitvec.toNat (Vector.tail v))) = 0w: โBitvec.toInt 0 = 0
zero(match Nat.zero, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else โ(Bitvec.toNat (Vector.tail v))) = 0
zero(match Nat.zero, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else โ(Bitvec.toNat (Vector.tail v))) = 0w: โ
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else โ(Bitvec.toNat (Vector.tail v))) = 0Goals accomplished! ๐w: โBitvec.toInt 0 = 0w: โ
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else โ(Bitvec.toNat (Vector.tail v))) = 0w: โ
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else โ(Bitvec.toNat (Vector.tail v))) = 0
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else โ(Bitvec.toNat (Vector.tail v))) = 0w: โ
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else โ(Bitvec.toNat (Vector.tail v))) = 0
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else โ(Bitvec.toNat (Vector.tail v))) = 0w: โ
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else โ(Bitvec.toNat (Vector.tail v))) = 0@[simp] theorem toInt_eq_zero {Goals accomplished! ๐w :w: โNat} (Nat: Typeb : Bitvecb: Bitvec ww) :w: โb.toInt =b: Bitvec w0 โ0: ?m.343121b =b: Bitvec w0 :=0: ?m.343147Goals accomplished! ๐Bitvec.toInt b = 0 โ Bitvec.toInt b = Bitvec.toInt 0Bitvec.toInt b = 0 โ Bitvec.toInt b = 0theoremGoals accomplished! ๐toInt_one : โ {toInt_one: โ {w : โ}, 1 < w โ Bitvec.toInt 1 = 1w :w: โโ} (โ: Type_hw :_hw: 1 < w1 <1: ?m.343257w), Bitvec.toInt (w: โ1 : Bitvec1: ?m.343296w) =w: โ1 |1: ?m.343321w+2, _ =>w: โGoals accomplished! ๐Bitvec.toInt 1 = 1Bitvec.toInt 1 = 1Bitvec.toInt 1 = 1Bitvec.toInt 1 = 1Bitvec.toInt 1 = 1-- from InstCombine/:805 theorem {Goals accomplished! ๐w :w: โNat} {Nat: Typex : Bitvecx: Bitvec ww} (w: โhw :hw: w > 1w >w: โ1) (1: ?m.346048hx :hx: x โ 0x โx: Bitvec w0) : Bitvec.sdiv?0: ?m.34608111: ?m.346109x = Option.some (Bitvec.select (((x: Bitvec wx +x: Bitvec w1).toNat <1: ?m.3461453) ::แตฅ Vector.nil)3: ?m.346221xx: Bitvec w0) :=0: ?m.346276Goals accomplished! ๐Goals accomplished! ๐Goals accomplished! ๐theorem : (Bitvec.sdiv? (Bitvec.ofInt'Goals accomplished! ๐ww: ?m.3470441)1: ?m.347068x) โค Option.some (Bitvec.select ((Nat.blt (Bitvec.addx: ?m.347062x (Bitvec.ofNatx: ?m.347062ww: ?m.3470441)).toNat (Bitvec.ofNat1: ?m.347080ww: ?m.3470443).toNat) ::แตฅ Vector.nil)3: ?m.347090x (Bitvec.ofNatx: ?m.347062ww: ?m.3470440)) :=0: ?m.347101sorry end Bitvecsorry: ?m.347123